Skip to content

Conversation

@wkhadgar
Copy link
Contributor

@wkhadgar wkhadgar commented Nov 7, 2025

Add a 'new' west command as helper for Zephyr projects, drivers and modules.

The project creation is the default state, generating a minimal configuration for a Zephyr app. The module creation consists of a simple template to be completed by the user. Driver creation follows the example_application format, producing or appending the created driver skeleton into the drivers and dts/bindings directories.

This west command aims to ease developers load when starting new projects, or porting existing code into drivers/modules that operate with west and Zephyr.

@zephyrbot zephyrbot added the area: West West utility label Nov 7, 2025
@wkhadgar wkhadgar force-pushed the west_new_command branch 2 times, most recently from 280b643 to 4f1db4f Compare November 7, 2025 21:50
@wkhadgar
Copy link
Contributor Author

wkhadgar commented Nov 7, 2025

Just noticed @kartben also got the same idea with #95798, maybe we could merge PRs?
Not sure how to proceed here

Add a new west command as helper for Zephyr projects, drivers and modules.

The project creation is the default state, generating a minimal
configuration for a Zephyr app. The module creation consists of a simple
template to be completed by the user. Driver creation follows the
`example_application` format, producing or appending the created driver
into the `drivers` and `dts/bindings` directories.

This west command aims to ease developers load when starting new projects,
or porting existing code into drivers/modules that operate with west and
Zephyr.

Signed-off-by: Paulo Santos <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding something like this requires more discussion. For instance, the code is embedded in a Python script - and it doesn't even follow the established naming of structs and macros.

To be honest, I don't see much value in generating boilerplate code this simple.

@wkhadgar
Copy link
Contributor Author

wkhadgar commented Nov 9, 2025

I think adding something like this requires more discussion.

Definitely! This is something I've been talking about with some other developers and they all agreed it would be nice to have a "quick starter" for smaller building blocks on Zephyr like drivers and modules, that's the main force that made me implement this

For instance, the code is embedded in a Python script - and it doesn't even follow the established naming of structs and macros.

Well, I'm not really going for a stone written like code to be generated, instead it would be necessary to do your modifications to the generated templates, it is more of a sample than an actual thing that should be used as is, not sure if I'm being clear, but we could discuss this further! Maybe an RFC?

To be honest, I don't see much value in generating boilerplate code this simple.

I guess we could also discuss that! I went deliberately to the as simple as possible way, since it should be more of a building block than a full feature maker, I'm afraid that over doing templates would sorta limit the user implementations or embed some personal code style into the templates and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants